Suspends notifications while massive changes are being made to a data table.

Namespace:  C1.LiveLinq.AdoNet
Assembly:  C1.LiveLinq (in C1.LiveLinq.dll)

Syntax

C#
public void BeginUpdate()
Visual Basic
Public Sub BeginUpdate

Remarks

This method must be followed by EndUpdate()()()().

Use this method when you already have indexes built over a data table or live views based on that data table, and you need to re-populate it or perform other massive changes to rows of that data table. Without this method, every single change you make causes LiveLinq to perform necessary operations for maintaining your indexes and live views dependent on this data table. In case of massive changes, this can be slower than to wait until the massive changes are done and rebuild the indexes and live views.

Between BeginUpdate and EndUpdate()()()() calls, indexes, live views, bound controls and other change notification listeners are not updated, they don't receive change notifications.

When EndUpdate()()()() is called, a SourceChangeType.Modify or SourceChangeType.Reset notification is sent, depending on whether the change affected a single row or multiple rows of the data table. Even when you change a single row, it may make sense to enclose your changes in BeginUpdate/EndUpdate if you change multiple fields in the row. In that case a SourceChangeType.Modify notification is sent. If more than one row was changed, a SourceChangeType.Reset notification is sent, meaning all indexes, live views and other collections dependent on this data table must be rebuilt from scratch.

See Also